<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "gky_upfile".
 *
 * @property string $id
 * @property string $activetype
 * @property string $activeid
 * @property string $filename
 * @property string $path
 * @property string $filetype
 * @property string $addmanid
 * @property string $addman
 * @property string $addtime
 * 
 * @property Project $project
 */
class Upfile extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'gky_upfile';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['addmanid', 'addtime'], 'integer'],
            [['activetype'], 'string', 'max' => 32],
            [['activeid', 'filename', 'addman'], 'string', 'max' => 64],
            [['path'], 'string', 'max' => 255],
            [['filetype'], 'string', 'max' => 256],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'activetype' => 'Activetype',
            'activeid' => 'Activeid',
            'filename' => 'Filename',
            'path' => 'Path',
            'filetype' => 'Filetype',
            'addmanid' => 'Addmanid',
            'addman' => 'Addman',
            'addtime' => 'Addtime',
        ];
    }
    
    /**
     * @return \yii\db\ActiveQuery
     */
    public function getProject()
    {
        return $this->hasOne(Project::className(), ['id' => 'activeid']);
    }
    
    
}
